#!/usr/bin/env python2
#-*-coding=utf-8-*-

def payment(ob, mp):
    num = 0
    balance = []
    paid = []
    while ob > mp:
        balance.append(ob)
        paid.append(mp)
        ob -= mp
        num += 1
    paid.append(mp)
    balance.append(ob)
    paid.append(ob)
    balance.append(0)
    print '------    -------    ------'
    print ' pamt#' '    ' 'balance' '    ' ' paid '
    for i in range(num + 2):
        print '%.2f    %.2f    %.2f' % (i, paid[i], balance[i])
if __name__ == '__main__':
    ob = float(raw_input('Enter opening balance: '))
    mp = float(raw_input('Enter monthly payment: '))
    payment(ob, mp)
